<template>
	<view>
		<view v-for="tableDatas in tableData" :key="tableData.id">
			<uni-section  type="line">
				<uni-card :title="tableDatas.name"  align="center">
					<video :src="tableDatas.url" 
					:controls="true" 
					:enable-progress-gesture="true" 
					:show-center-play-btn="true" 
					:http-cache="true"
					:autoplay="true"
					 style="margin-left: 20rpx;"
					 align="center"></video>
				</uni-card>
			</uni-section>
			<button type="primary" style="margin: 40rpx;" @tap="Back">返回</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tableData: {},
			}
		},
		onLoad: function(option) {

			this.request({
				url: '/file/page?pageNum=1&pageSize=1&name=&id=' + option.id,
				method: 'GET'
			}).then(res => {
				this.tableData = res.data.records
			})
		},

		methods:{
			Back(){
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>
